package com.study.springboottest.thread;

public class RunThread implements Runnable {

    public static void main(String[] args) {
        RunThread runThread = new RunThread();
        Thread threadA = new Thread(runThread);
        Thread threadB = new Thread(runThread);
        threadA.setName("threadA");
        threadB.setName("threadB");
        threadA.start();
        threadB.start();
    }

    @Override
    public void run() {
        for (int i = 0; i < 25; i++) {
            System.out.println(Thread.currentThread().getName());
        }
    }
}
